<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	</body>
	<script type="text/javascript">
		var str="17782244420";
		
		str=str.replace(/(\d{4})(\d{4})(\d{3})/,function(a,b,c,d){
			return b+"****"+d;
		})
		
		console.log(str);
		
	</script>
</html>
